﻿using MVCT7._3.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MVCT7._3.Controllers
{
    public class DefaultController : Controller
    {
        private fashionshoppingDBEntities _context;
        public  DefaultController()
        {
            _context = new fashionshoppingDBEntities();
        }
        // GET: Default
        public ActionResult Index()
        {
            return View();
        }
        public ActionResult Search()
        {
            return View();
        }
        public ActionResult Search(string name)
        {
            var most = _context.Product.Where(u => u.title.Contains(name)).ToList();
            return PartialView("_PartialPage1", most);
        }
    }
}